package hello;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RestController
@RequestMapping("/task")
public class TaskController{

    @GetMapping("count/{type}")
    public int count(@PathVariable int type){

      return type;
    }

    @GetMapping("progress/{type}")
    public int progress(@PathVariable int type){

        return ++type;
//        return Math.abs(new Random().nextInt() % 100);
    }

}